<?php
/**
 * CorsMiddleware
 *
 * @Description 描述
 * @Author look
 * @CreateTime 2022/2/23
 */

namespace app\admin\middleware;

use think\middleware\AllowCrossDomain;

/**
 * Class CorsMiddleware
 */
class CorsMiddleware extends AllowCrossDomain {

    protected $header = [
        'Access-Control-Allow-Credentials' => 'true',
        'Access-Control-Max-Age'           => 1800,
        'Access-Control-Allow-Methods'     => 'GET, POST, PATCH, PUT, DELETE, OPTIONS',
        'Access-Control-Allow-Headers'     => 'Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-CSRF-TOKEN, X-Requested-With, time, notify, sign, version, platform',
    ];

}